 <meta charset="utf-8">
<div class="box box-primary" id="app_practitioner_edit">
                      <form role="form" id="editForm">
              <div class="box-body" >
              <div class="row">
              
              <div class="col-md-6">
              		           <div class="form-group">
                  <label for="name">执业人员姓名</label>
                  <input type="text"   v-model="practitioner.name"  name="name" class="form-control" id="name" placeholder="请输入名称" required >
                </div> 
                   <div class="form-group">
                  <label for="gender" >性别</label>
                  <select v-model="practitioner.gender" id="gender" name="gender"  class="form-control"   >
                    <option value="1">男</option>
                    <option value="2">女</option>
                  </select>
                </div>
                 <div class="form-group">
                  <label for="name">执业证号</label>
                  <input type="text"   v-model="practitioner.number"  name="number" class="form-control" id="number" placeholder="请输入名称" >
                </div>
                  <div class="form-group">
                  <label for="name">身份证号码</label>
                  <input type="text"   v-model="practitioner.idCard"  name="idCard" class="form-control" id="idCard" placeholder="请输入身份证号码" >
                </div> 
                
                 <div class="form-group">
                  <label for="name">执业初始时间</label>
                   <input type="text"  v-kmdate="{vmodel:'practitioner.positionTime',format:'yyyy-MM-dd'}"  v-model="practitioner.positionTime"  name="positionTime" class="form-control" id="positionTime" placeholder="" >
                </div> 
                
                 <div class="form-group">
                  <label for="zzmm">政治面貌</label>
                 <select class="form-control" id="zzmm"  name="zzmm" v-model="practitioner.zzmm" >
                 	<option value="群众">群众</option>
                 	<option value="团员">团员</option>
                 	<option value="党员">党员</option>
                 </select>
                </div> 
                
                
                 <div class="form-group">
                  <label for="name">执业人员电话</label>
                  <input type="text"   v-model="practitioner.phone"  name="phone" class="form-control" id="phone" placeholder="请输入电话" >
                </div> 
                
             
              
              
              </div>
              <div class="col-md-6">
                <div class="form-group">
					<label for="orgId" class="control-label">所属部门</label>
                  	<select id="orgId" v-model="practitioner.orgId" name="orgId" v-kselect="{url:'tcms/orgnization/loadOrgnizationComboboVo',vmodel:'practitioner.orgId',firstEmpty:'true'}" class=" form-control"   > </select>
				</div>
				
                
                <div class="form-group">
                  <label for="enabled" >是否启用</label>
                  <select v-model="practitioner.enabled" id="enabled" name="enabled"  class="form-control"  required >
                    <option value="1">启用</option>
                    <option value="0">禁用</option>
                  </select>
                </div>
              		   
                 <div class="form-group">
                  <label for="remark">住址</label>
                  <textarea type="text"   v-model="practitioner.address" name="address"  class="form-control" id=address cols="20" rows="2" ></textarea>
                </div> 
                
                 <div class="form-group">
                  <label for="skill">业务专长</label>
                  <textarea type="text"   v-model="practitioner.skill" name="skill"  class="form-control" id=skill cols="20" rows="3" ></textarea>
                </div> 
                
                  <div class="form-group">
                  <label for="profile">个人简介</label>
                  <textarea type="text"   v-model="practitioner.profile" name="profile"  class="form-control" id=profile  cols="20" rows="5"></textarea>
                </div> 
              </div>
              </div>
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                 <button type="button" class="btn btn-default" v-on:click="cancel">取消</button>
                 <button type="button" class="btn btn-info pull-right"  v-on:click="edit">提交</button>
              </div>
              
            </form>

<script type="text/javascript">
var vm = new Vue({
        el: '#app_practitioner_edit',
        data: {
           	practitioner:{
        		name: null,
        		number: null,
        		phone: null,
        		gender: null,
        		orgId: null,
        		enabled: 1,
        		remark: null,
        		idCard: null,
        		positionTime: null,
        		address: null,
        		skill: null,
        		zzmm: null,
        		profile: null,
        	},
        	    bus:new Vue()
        },
        mounted:function(){
       	 var _this=this;
    	 _this.bus.$once(zfesVueDirective.getKselectOnInitEventName("orgId"), function (msg) {
        		_this.initForm();
    		 });
        },
         methods: {
        	 initForm:function(){
        		 let _this=this;
        		 let url="tcms/practitioner/loadPractitioner";
            	 let param=zfesLayerEditDg.getLayerParam();
        		 zfesAjax.ajaxTodo(url,param, function(data){
            		 _this.$data.practitioner=data.data.practitioner;
            	 });
        	 },
        	 edit: function () {
        	    	if($("#editForm").valid()){
        	    		let _this=this;
        	    		var url="/tcms/practitioner/updatePractitioner";
        	    		zfesAjax.ajaxTodo(url,_this.$data.practitioner, function(data){
        	    			alertSwal.successText(data.message);
        	    			 layer.close(layer.index);
        	    		})
        	    	}
        	    },
        	    cancel: function(){
        	    	zfesLayerEditDg.close();
        	    	 
        	    }
        }
    })

 </script>
</div>